/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GeneralTesting;

import edu.uci.ics.jung.algorithms.filters.KNeighborhoodFilter.EdgeType;
import edu.uci.ics.jung.graph.Graph;
import edu.uci.ics.jung.graph.SparseMultigraph;

/**
 *
 * @author Heather
 */
public class SimpleGraphView
{

  public Graph<Integer, String> g;

  public SimpleGraphView()
  {
    g = new SparseMultigraph<Integer, String>();
// Add some vertices. From above we defined these to be type Integer.
    g.addVertex((Integer) 1);
    g.addVertex((Integer) 2);
    g.addVertex((Integer) 3);
    g.addVertex((Integer) 4);
    g.addVertex((Integer) 5);
// Add some edges. From above we defined these to be of type String
// Note that the default is for undirected edges.
    g.addEdge("Edge-A", 1, 2); // Note that Java 1.5 auto-boxes primitives
    g.addEdge("Edge-B", 2, 3);
    g.addEdge("Edge3", 1, 3);
    g.addEdge("Edge4", 1, 4);
    g.addEdge("Edge5", 4, 5);
  }
}
